package java67_11;

public class ScoreCalc {
	String name;
	int javaScore;
	int charpScore;
	int dbScore;

	// 总成绩
	public int calcTotal() {
//		int he = javaScore + charpScore + dbScore;
//		return he;
		return javaScore + charpScore + dbScore;
	}

	// 平均值
	public int calcAvg() {
		// int he = calcTotal();
		// int avg = he / 3;
		// return avg;
		return calcTotal() / 3;
	}

	public void showTotal() {
		System.out.println(name + "三门课的总分是:" + calcTotal());
	}

	public void showAvg() {
		System.out.println(name + "三门课的总分是:" + calcAvg());
	}
}
